<!--{include manage/header}-->
<body style="background-color:rgb(239, 239, 239);color: #6699FF">
<form method="POST" name="theForm" id="theForm" action="index.php?action=showConfig&file=config&submit=true">
	<div style="height: 480px;" id="game_content">
	    <div style="padding: 10px;" id="game_base">
	        <table width="100%" >
			  <tbody>
			  <tr >
			    <td class="label">数据库类型</td>
			    <td align="left">
			      <input gtbfieldid="1" name="config[type]" id="game_cn_title" size="40" class="easyui-validatebox validatebox-text" required="true" missingmessage="不能为空" type="text" value="{$config['type']}">
			    </td>
			  </tr>
			  <tr >
			    <td class="label">连接地址</td>
			    <td align="left">
			      <input gtbfieldid="1" name="config[host]" id="game_cn_title" size="40" class="easyui-validatebox validatebox-text" required="true" missingmessage="不能为空" type="text" value="{$config['host']}">
			    </td>
			  </tr>
			  <tr >
			    <td class="label">数据库用户</td>
			    <td align="left">
			      <input gtbfieldid="1" name="config[db_user]" id="game_cn_title" size="40" class="easyui-validatebox validatebox-text" required="true" missingmessage="不能为空" type="text" value="{$config['db_user']}">
			    </td>
			  </tr>
			  <tr >
			    <td class="label">连接密码</td>
			    <td align="left">
			      <input gtbfieldid="1" name="config[password]" id="game_cn_title" size="40" type="text" value="{$config['password']}">
			    </td>
			  </tr>
			  <tr >
			    <td class="label">数据库名</td>
			    <td align="left">
			      <input gtbfieldid="1" name="config[db_database]" id="game_cn_title" size="40" class="easyui-validatebox validatebox-text" required="true" missingmessage="不能为空" type="text" value="{$config['db_database']}">
			    </td>
			  </tr>
			  <tr >
			    <td class="label">数据库编码</td>
			    <td align="left">
			      <input gtbfieldid="1" name="config[code]" id="game_cn_title" size="40" class="easyui-validatebox validatebox-text" required="true" missingmessage="不能为空" type="text" value="{$config['code']}">
			    </td>
			  </tr>
			  <tr >
			    <td class="label">每页显示条数</td>
			    <td align="left">
			      <input gtbfieldid="1" name="config[num]" id="game_cn_title" size="40" class="easyui-validatebox validatebox-text" required="true" missingmessage="不能为空" type="text" value="{$config['num']}">
			    </td>
			  </tr>
			  <tr >
			    <td class="label">数据库前置</td>
			    <td align="left">
			      <input gtbfieldid="1" name="config[tablepre]" id="game_cn_title" size="40" class="easyui-validatebox validatebox-text" required="true" missingmessage="不能为空" type="text" value="{$config['tablepre']}">
			    </td>
			  </tr>
			  <tr >
			    <td class="label">数据库前置</td>
			    <td align="left">
			      <input gtbfieldid="1" name="config[tablepre]" id="game_cn_title" size="40" class="easyui-validatebox validatebox-text" required="true" missingmessage="不能为空" type="text" value="{$config['tablepre']}">
			    </td>
			  </tr>
			  <tr >
			    <td class="label">后台目录</td>
			    <td align="left">
			      <input gtbfieldid="1" name="config[manage]" id="game_cn_title" size="40" class="easyui-validatebox validatebox-text" required="true" missingmessage="不能为空" type="text" value="{$config['manage']}">
			    </td>
			  </tr>
			  <tr>
			    <td class="label">cookie作用域</td>
			    <td align="left">
			      <input gtbfieldid="2" name="config[domain]" id="game_jp_title" size="40" class="easyui-validatebox validatebox-text" type="text" missingmessage="不能为空" value="{$config['domain']}">
			    </td>
			  </tr>
			  <tr>
			    <td class="label">网站首页域名</td>
			    <td align="left">
			      <input gtbfieldid="3" name="config[web]" id="game_en_title" size="40" type="text" class="easyui-validatebox validatebox-text" missingmessage="不能为空" value="{$config['web']}">
			    </td>
			  </tr>
			  <tr>
			    <td class="label">图片域名</td>
			    <td align="left">
			      <input gtbfieldid="4" name="config[pic]" id="game_website" size="40" type="text" class="easyui-validatebox validatebox-text" missingmessage="不能为空" value="{$config['pic']}">
			    </td>
			  </tr>
			  <tr>
			    <td class="label">注册域名</td>
			    <td align="left">
			      <input gtbfieldid="9" name="config[home]" id="game_release_date" size="40"  class="easyui-validatebox validatebox-text" required="true" missingmessage="不能为空" type="text"  value="{$config['home']}">
			    </td>
			  </tr>
			  <tr>
			    <td class="label">cookie防破解码</td>
			    <td align="left">
			      <input gtbfieldid="10" name="config[HASHCODE]" id="game_game_download"  class="easyui-validatebox validatebox-text" size="40" type="text" missingmessage="不能为空" value="{$config['HASHCODE']}">
			    </td>
			  </tr>
			  <tr>
			    <td class="label">是否生成静态</td>
			    <td align="left">
			      生成<input type="radio" name="config[html]" checked/>不<input type="radio" name="config['html']">
			    </td>
			  </tr>
			  <tr>
			    <td class="label">备案号</td>
			    <td align="left">
			      <input gtbfieldid="10" name="config[beian]" id="game_game_download"  class="easyui-validatebox validatebox-text" size="40" type="text" missingmessage="不能为空" value="{$config['beian']}">
			    </td>
			  </tr>
		  </tbody>
		  </table>
	    </div>
	</div>
    <div style="padding: 5px; text-align: center; background: none repeat scroll 0% 0% rgb(239, 239, 239);">
    	<input value="保存配置" type="submit">
    </div>
</form>
<script>
$('#theForm').form({
    onSubmit:function(){
        return $(this).form('validate');
    },
    success:function(data){
    	JSONData = $.evalJSON(data);
    	if(JSONData.status=="success"){
			alert('配置文件修改成功');
			window.parent.$('#tabs').tabs('close','配置文件');
    	}else{
    		$.messager.alert('提示信息', JSONData.msg );
    	}
    }
});
</script>
</body>
</html>